// Mesh Format Loader
// (c) jimon game studio

#ifndef JEH_IMESHFORMATLOADER
#define JEH_IMESHFORMATLOADER

#include "jeUnknown.h"
#include "IBuffer.h"
#include "jeMesh.h"
#include "IRender.h"

namespace je
{
	namespace scene
	{
		//! Image Format
		enum MeshFormat
		{
			//! JED Format
			MF_JED,

			//! SBS Format
			MF_SBS,

			//! B3D Format
			MF_B3D
		};

		//! Format Loader
		class IMeshFormatLoader:public je::jeUnknown
		{
		public:
			//! Destructor
			virtual ~IMeshFormatLoader()
			{
			}

			//! Load Mesh
			virtual jeMesh * LoadMesh(core::IBuffer * DataBuffer,video::IRender * Render) = 0;

			//! Save Mesh
			virtual void SaveMesh(core::IBuffer * DataBuffer,jeMesh * Mesh) = 0;

			//! Return true if mesh loader can work with this data
			virtual u1 CanWorkWithThis(core::IBuffer * DataBuffer) = 0;

			//! Return Mesh Format
			virtual MeshFormat GetMeshFormat() = 0;
		};
	}
}

#endif
